package com.shanling.shanlingcontroller.utils;

import android.content.res.Resources;

import com.shanling.shanlingcontroller.CustomApplication;
import com.shanling.shanlingcontroller.R;

/**
 * Created by ch1 on 2019/9/27.
 */

public class CodeMessgeUtils {

    public static String getMessage(String  code){
        String msg="";
        Resources resources = CustomApplication.getInstance().getResources();
        switch (code){
            case "1001":
                msg=resources .getString(R.string.error1001);
                break;
            case "1002":
                msg= resources.getString(R.string.error1002);
                break;
            case "1003":
                msg= resources.getString(R.string.error1003);
                break;
            case "1004":
                msg=resources.getString(R.string.error1004);
                break;
            case "1005":
                msg= resources.getString(R.string.error1005);
                break;
            case "1006":
                msg= resources.getString(R.string.error1006);
                break;
            case "1007":
                msg= resources.getString(R.string.error1007);
                break;
            case "1008":
                msg= resources.getString(R.string.error1008);
                break;
            case "1009":
                msg= resources.getString(R.string.error1009);
                break;
            case "1010":
                msg= resources.getString(R.string.error1010);
                break;
            case "1011":
                msg= resources.getString(R.string.error1011);
                break;
            case "1012":
                msg= resources.getString(R.string.error1012);
                break;
            case "9102":
                msg=resources.getString(R.string.error1014);
                default:
                    msg=resources.getString(R.string.error1013);
                    break;
        }
        return msg;
    }
}
